Skip to content

Refactor: modify card list grid (#350)#351

Merged
Bangdayeon merged 1 commit intomainfrom
refactor/#350-modify-card-list-grid
Feb 27, 2026
Merged

Refactor: modify card list grid (#350)#351
Bangdayeon merged 1 commit intomainfrom
refactor/#350-modify-card-list-grid

Conversation

@Bangdayeon
Copy link
Member

@Bangdayeon Bangdayeon commented Feb 4, 2026

관련 이슈

PR 설명

  • card list grid 화면 크기 변경시에 레이아웃 깨지지 않도록 수정

@Bangdayeon Bangdayeon self-assigned this Feb 4, 2026
@Bangdayeon Bangdayeon linked an issue Feb 4, 2026 that may be closed by this pull request
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

요약

이 풀 요청은 pre-commit 훅과 package.json의 lint 스크립트에서 exec 래퍼를 제거하고, CardList와 LinkCard의 레이아웃을 고정 치수에서 반응형/종횡비 기반 클래스로 전환하며, AllLink 페이지에서 CardList 컴포넌트를 사용하도록 교체하고, globals.css에 WebKit용 no-scrollbar 규칙(.no-scrollbar::-webkit-scrollbar { display: none; })을 추가하는 변경을 포함합니다.

Walkthrough

  • .husky/pre-commit: pnpm exec lint-staged || exit 1pnpm lint-staged || exit 1로 변경.
  • package.json: lint 스크립트 "exec eslint .""eslint .".
  • src/components/basics/CardList/CardList.tsx: 그리드 레이아웃을 기본 2열, md 이상 4열의 반응형으로 변경하고 고정 너비 제거.
  • src/components/basics/LinkCard/LinkCard.tsx: 고정 높·너비 클래스에서 종횡비(aspect-*) 기반의 반응형 클래스와 w-full 등으로 변경.
  • src/app/(route)/all-link/AllLink.tsx: 그리드 래퍼를 CardList 컴포넌트로 교체(무한 스크롤 래퍼 유지).
  • src/styles/globals.css: .no-scrollbar::-webkit-scrollbar { display: none; } 추가.

Possibly related PRs

  • CardList 컴포넌트 구현 #98 — src/components/basics/CardList/CardList.tsx에 대한 변경을 포함하며, CardList 관련 레이아웃/구성 변경과 직접적인 코드 수준 연관성이 있음.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 카드 리스트 그리드 수정이라는 주요 변경사항을 명확하게 요약하고 있으며, 관련 이슈 번호(#350)도 포함하고 있습니다.
Description check ✅ Passed PR 설명은 템플릿의 필수 섹션(관련 이슈, PR 설명)을 모두 포함하고 있으며, 변경사항의 목적과 내용이 명시되어 있습니다.
Linked Issues check ✅ Passed PR의 모든 변경사항(CardList 반응형 그리드, LinkCard 반응형 레이아웃, 관련 스크립트 최적화)이 이슈 #350의 목표인 '화면 크기 변경시 레이아웃 안정성 유지'를 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 카드 리스트 레이아웃 안정성 개선과 직접적으로 관련되어 있으며, 이슈 범위 내에서 이루어졌습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#350-modify-card-list-grid

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/components/basics/LinkCard/LinkCard.tsx`:
- Line 30: In LinkCard.tsx update the className on the root element: replace the
erroneous Tailwind token "flexs" with "flex" so the flex layout and "flex-col"
take effect; locate the className string in the LinkCard component and make that
single-token change.
- Around line 45-53: The Tailwind utilities used in LinkCard.tsx (aspect-94/47,
aspect-94/69, aspect-47/58, max-w-94) are not defined in the theme; update the
className strings in the LinkCard component to use Tailwind arbitrary-value
syntax (e.g., aspect-[94/47], aspect-[94/69], aspect-[47/58], max-w-[94px]) so
the aspect-ratio and max-width resolve correctly, keeping the same class
ordering and other classes (e.g., replace in the divs that currently use
aspect-94/47, aspect-94/69 and max-w-94).

@Bangdayeon Bangdayeon force-pushed the refactor/#350-modify-card-list-grid branch from 936b11b to 35b65a4 Compare February 22, 2026 15:38
@Bangdayeon Bangdayeon force-pushed the refactor/#350-modify-card-list-grid branch from 35b65a4 to 801bb4e Compare February 22, 2026 15:39
@Bangdayeon Bangdayeon changed the title [WIP] Refactor: modify card list grid (#350) Refactor: modify card list grid (#350) Feb 22, 2026
@Seong-Myeong
Copy link
Contributor

현 PR에서 머지 후 테스트 필요한게 어떤게 있을까요 @Bangdayeon

@Bangdayeon
Copy link
Member Author

현 PR에서 머지 후 테스트 필요한게 어떤게 있을까요 @Bangdayeon

본문 수정을 못했네요. 수정했습니다.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/(route)/all-link/AllLink.tsx (1)

58-69: ⚠️ Potential issue | 🟡 Minor

CardListno-scrollbar 클래스가 현재 구조에서 불필요합니다.

CardListoverflow 속성 없이 순수 그리드 컨테이너(grid grid-cols-2 gap-4 md:grid-cols-4)로 렌더링됩니다. 스크롤은 부모 div(Line 49, overflow-y-auto)에서 처리되므로, CardListno-scrollbar 클래스는 스크롤바를 숨길 대상이 없어 효과가 없습니다.

CardList.tsx에서 하드코딩된 no-scrollbar 클래스는 제거하거나, 향후 CardList 자체가 overflow 컨테이너가 되는 경우를 대비해 조건부 적용 가능하도록 prop이나 variant로 변경하는 것을 권장합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/`(route)/all-link/AllLink.tsx around lines 58 - 69, The CardList
component is currently emitting a hardcoded "no-scrollbar" class which is
ineffective here because scrolling is handled by the parent; open CardList.tsx
and remove the hardcoded "no-scrollbar" class (or replace it with a conditional
prop/variant such as hideScrollbar:boolean or variant="no-scrollbar" that
toggles the class) so callers like AllLink.tsx (where CardList wraps LinkCard
items) don't receive an unnecessary class; if you add a prop, update usages
accordingly (e.g., remove any prop usage in AllLink.tsx) and ensure the default
behavior is unchanged when the prop is omitted.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/basics/LinkCard/LinkCard.tsx`:
- Line 53: In LinkCard (the div with className "flex aspect-94/69 w-full flex-1
flex-col justify-between p-3") there is a conflict between flex-1 and
aspect-94/69 that can break height calculation; update that element in
LinkCard.tsx to use only one sizing approach—either remove "flex-1" if you want
the fixed aspect ratio ("aspect-94/69") to control height, or remove
"aspect-94/69" if you want the flex layout to allocate remaining height—then
ensure the remaining classes ("flex", "w-full", "flex-col", "justify-between",
"p-3") remain intact.

---

Outside diff comments:
In `@src/app/`(route)/all-link/AllLink.tsx:
- Around line 58-69: The CardList component is currently emitting a hardcoded
"no-scrollbar" class which is ineffective here because scrolling is handled by
the parent; open CardList.tsx and remove the hardcoded "no-scrollbar" class (or
replace it with a conditional prop/variant such as hideScrollbar:boolean or
variant="no-scrollbar" that toggles the class) so callers like AllLink.tsx
(where CardList wraps LinkCard items) don't receive an unnecessary class; if you
add a prop, update usages accordingly (e.g., remove any prop usage in
AllLink.tsx) and ensure the default behavior is unchanged when the prop is
omitted.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 936b11b and 45f21c0.

📒 Files selected for processing (6)
  • .husky/pre-commit
  • package.json
  • src/app/(route)/all-link/AllLink.tsx
  • src/components/basics/CardList/CardList.tsx
  • src/components/basics/LinkCard/LinkCard.tsx
  • src/styles/globals.css
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/components/basics/CardList/CardList.tsx
  • package.json
  • .husky/pre-commit

@Seong-Myeong
Copy link
Contributor

코드래빗 리뷰 확인부탁드립니다 @Bangdayeon

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.husky/pre-commit:
- Line 4: The pre-commit hook currently runs "pnpm lint-staged" but package.json
has no "lint-staged" script and lint-staged is only a devDependency, so the hook
fails; either revert the hook line in .husky/pre-commit to use "pnpm exec
lint-staged" or add a "lint-staged": "lint-staged" script entry in package.json
so "pnpm run lint-staged" resolves—update the .husky/pre-commit invocation or
the package.json script accordingly to restore the hook.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45f21c0 and 8d481f6.

📒 Files selected for processing (6)
  • .husky/pre-commit
  • package.json
  • src/app/(route)/all-link/AllLink.tsx
  • src/components/basics/CardList/CardList.tsx
  • src/components/basics/LinkCard/LinkCard.tsx
  • src/styles/globals.css
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/components/basics/CardList/CardList.tsx
  • src/app/(route)/all-link/AllLink.tsx
  • package.json
  • src/components/basics/LinkCard/LinkCard.tsx

@Bangdayeon Bangdayeon merged commit a74cb11 into main Feb 27, 2026
3 checks passed
@Bangdayeon Bangdayeon deleted the refactor/#350-modify-card-list-grid branch February 27, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] 카드 리스트 수정

2 participants